Extending N4 code

You can extend N4 by injecting Groovy-language code that extends or becomes part of the N4 business flow. This allows for extensive customization, including but not limited to:

The features related to N4 code extensibility fall into these categories:

Code extensions offer a more standardized approach than Groovy plug-ins, which makes them easier to use and upgrade because they are less prone to failure and require less cleanup after an upgrade.

All Groovy plug-in APIs are listed in the Navis N4: SDK.

That said, as of N4 version 4.0.13, you still need to use Groovy plug-ins for the following:

N4 supports code extensions that are subclasses from system-seeded code extensions which are delivered from Navis. You can create a code extension using Groovy code with subclasses from a Groovy class in a system-seeded code extension.

N4 does not support subclasses from non-system seeded code extensions. Code extensions, which are written as a Groovy class, cannot be overridden by a subclass. For example, if Groovy class ‘A’ is installed as a code extension, it is not possible for another Groovy class to be written as a code extension which extends or overrides ‘A’. If you create a code extension using Groovy code that are subclasses from one of your own code extensions (not system-seeded), then this code extension may not work.

The following figure gives an overview of integration transport, where identifies support for Groovy/code extensions.

In general, to be able to write good Groovy code, you should have knowledge in all areas illustrated in the following figure. Remember: Groovy is not configuration; it is programming.

The following list refers to real-life use cases; they show that you can extend N4 code to implement: